#pragma once

#include<pthread.h>

class LockGuard
{
public:
    LockGuard(pthread_mutex_t* mutex)
        :_mutex(mutex)
    {}

    ~LockGuard()
    {
        pthread_mutex_destroy(_mutex);
    }

private:
    pthread_mutex_t* _mutex;
};